package cn.fl.relationmap.excel;
import cn.fl.relationmap.util.date.RelationMapDateStyle;
import cn.fl.relationmap.util.date.RelationMapDateUtil;
import com.google.common.collect.Lists;
import java.util.Date;

import tc.relationmap.facade.relationmap.employee.dto.RmEmployeeBscInfoDTO;
import tc.relationmap.facade.relationmap.employee.dto.RmEmployeeEmerRDTO;

public class ExcelVOToDTO {

    public static RmEmployeeBscInfoDTO toDTO(RmEmployeeExcel rmEmployeeExcel){

        String emergencyLinkman = rmEmployeeExcel.getEmergencyLinkman();
        String emergencyPhone = rmEmployeeExcel.getEmergencyPhone();
        String emergencyRelation = rmEmployeeExcel.getEmergencyRelation();
        RmEmployeeEmerRDTO rmEmployeeEmerRDTO = new RmEmployeeEmerRDTO();
        rmEmployeeEmerRDTO.setIsValid(1);
        rmEmployeeEmerRDTO.setIsDel(0);
        rmEmployeeEmerRDTO.setCrtTm(new Date());
        rmEmployeeEmerRDTO.setMdfTm(new Date());
        rmEmployeeEmerRDTO.setEmergencyLinkman(emergencyLinkman);
        rmEmployeeEmerRDTO.setEmergencyPhone(emergencyPhone);
        rmEmployeeEmerRDTO.setEmergencyRelation(emergencyRelation);
        RmEmployeeBscInfoDTO rmEmployeeBscInfoDTO = new RmEmployeeBscInfoDTO();
        rmEmployeeBscInfoDTO.setRmEmployeeEmerRDTOS(Lists.newArrayList(rmEmployeeEmerRDTO));
        rmEmployeeBscInfoDTO.setEmployeeNo(rmEmployeeExcel.getEmployeeNo());
        rmEmployeeBscInfoDTO.setEmployeeName(rmEmployeeExcel.getEmployeeName());
        rmEmployeeBscInfoDTO.setMobilePhone(rmEmployeeExcel.getMobilePhone());
        rmEmployeeBscInfoDTO.setCompanyName(rmEmployeeExcel.getCompanyName());
        rmEmployeeBscInfoDTO.setDeptName(rmEmployeeExcel.getDeptName());
        rmEmployeeBscInfoDTO.setEmployeeFunction(rmEmployeeExcel.getEmployeeFunction());
        rmEmployeeBscInfoDTO.setEmployeePost(rmEmployeeExcel.getEmployeePost());
        rmEmployeeBscInfoDTO.setEntryDate(rmEmployeeExcel.getEntryDate());
        rmEmployeeBscInfoDTO.setIdNo(rmEmployeeExcel.getIdNo());
        rmEmployeeBscInfoDTO.setCensus(rmEmployeeExcel.getCensus());
        rmEmployeeBscInfoDTO.setNation(rmEmployeeExcel.getNation());
        rmEmployeeBscInfoDTO.setWorkCity(rmEmployeeExcel.getWorkCity());
        rmEmployeeBscInfoDTO.setEmployeeSts(rmEmployeeExcel.getEmployeeSts());
        rmEmployeeBscInfoDTO.setRecruitmentChannel(rmEmployeeExcel.getRecruitmentChannel());
        rmEmployeeBscInfoDTO.setSex(rmEmployeeExcel.getSex());
        rmEmployeeBscInfoDTO.setDegree(rmEmployeeExcel.getDegree());
        rmEmployeeBscInfoDTO.setSchoolTag(rmEmployeeExcel.getSchoolTag());
        rmEmployeeBscInfoDTO.setMajor(rmEmployeeExcel.getMajor());
        rmEmployeeBscInfoDTO.setMaritalSts(rmEmployeeExcel.getMaritalSts());
        rmEmployeeBscInfoDTO.setCurrentAddress(rmEmployeeExcel.getCurrentAddress());
        rmEmployeeBscInfoDTO.setWageCardNo(rmEmployeeExcel.getWageCardNo());
        rmEmployeeBscInfoDTO.setPersonalAccount(rmEmployeeExcel.getPersonalAccount());
        rmEmployeeBscInfoDTO.setBankName(rmEmployeeExcel.getBankName());
        rmEmployeeBscInfoDTO.setBankNo(rmEmployeeExcel.getBankNo());
        rmEmployeeBscInfoDTO.setEmployeeEmail(rmEmployeeExcel.getEmployeeEmail());
        rmEmployeeBscInfoDTO.setRmployeeRem(rmEmployeeExcel.getRmployeeRem());
        rmEmployeeBscInfoDTO.setIsValid(1);
        rmEmployeeBscInfoDTO.setIsDel(0);
        rmEmployeeBscInfoDTO.setCrtTm(new Date());
        rmEmployeeBscInfoDTO.setMdfTm(new Date());
        return rmEmployeeBscInfoDTO;

    }
}
